* Encoding: windows-1252.
* Dissociation scales.
compute cmiss=nmiss(curio1 to curio31)
sel if cmiss eq 0
compute dissoc=sum(curio1 to curio31)
compute dissoc2=sum(curio29,curio12,curio30,curio7,curio13
   ,curio22,curio16,curio20,curio15,curio24,curio27,curio18,
   curio28,curio11,curio14,curio25,curio23)
compute disfac1=sum(curio12,curio30,curio13,curio7,curio29,
   curio27,curio11,curio28)
compute disfac22=sum(curio25,curio24,curio26,curio9,curio17,
   curio5,curio10,curio6)
compute disfac32=sum(curio23,curio20,curio17,curio14,curio21,
   curio18,curio24,curio19)
compute disfac33=sum(curio26,curio9,curio25,curio5,curio8)
* Depression scales.
compute fmiss=nmiss(feel1 to feel24)
sel if fmiss eq 0
do repeat j=feel17,feel14,feel10,feel5
compute j=6-j
end repeat
compute depress=sum(feel8,feel6,feel19,feel4,feel9,feel16,feel21,
  feel11,feel7,feel20,feel24,feel1,feel18,feel13,feel22,feel2,
  feel12,feel23,feel3,feel17,feel14,feel10)
compute deprfaca=sum(feel8,feel19,feel6,feel11,feel4,feel21,feel12,
  feel9,feel16,feel22,feel23,feel17,feel14,feel10)
compute deprfacb=sum(feel2,feel3,feel1)

* Clusters.
sel if smissb lt 10
compute dummy=1
match files file=*/table=bmd/by dummy
* replace missing with sample mean
do repeat j=bri1 to bri400/k=md1 to md400
if missing(j) j=k
end repeat
compute tv =mean(bri295,bri268,bri373,bri105)
compute illfa4_2 =mean(BRI119,BRI378,BRI147,BRI112,BRI382)
compute illfa4_1=mean(BRI233,BRI32,BRI98,BRI266,BRI167,BRI397,
 BRI193,BRI81)
compute illfa4_4=mean( bri259,bri38,bri120)
compute illfa4_3=mean(BRI348,BRI359,BRI202,BRI207,BRI391,BRI13
 ,BRI12,BRI30)
compute sleep=mean(bri389,bri241,bri214)
compute allergie=mean(bri387,bri156,bri145,bri343,bri103,bri104
 ,bri63,bri325,bri153,bri280,bri230,bri10)
compute visiting=mean(bri398,bri399,bri294,bri291,bri261,bri225)
compute religion=mean(bri93,bri256,bri54,bri51,bri313
 ,bri331,bri19)
compute thrift=mean(bri272,bri121)
compute gardenin=mean(bri254,bri383,bri363,bri135,bri257,bri127)
compute writing=mean(bri226,bri161,bri26,bri379,bri181,bri129,bri290,bri14)
compute housekee=mean(bri338,bri160,bri216,bri392,bri52,
 bri315,bri221
  ,bri237,bri50,bri337,bri149,bri322,bri16)
compute women=mean(bri360,bri220,bri251,bri169,bri92,bri5)
compute impactev=mean(bri197,bri309,bri195,bri308,bri178,bri94)
compute verbal=mean(bri175,bri101)
compute reading=mean(bri217,bri380,bri282,bri159,bri238,bri68)
compute misc_a=mean(bri97,bri29,bri15,bri269,bri155,bri298,bri90)
compute music_dr=mean(bri239,bri381,bri180,bri25)
compute misc_b=mean(bri393,bri274,bri133,bri4)
compute dating=mean(bri341,bri164,bri33,bri368,bri355,bri34,bri22)
compute eating=mean(bri305,bri287,bri78)
compute drugs=mean(bri137,bri324,bri151,bri108,bri55,bri186,bri85,bri36
 ,bri27,bri297,bri163,bri45,bri21,bri18)
compute sports=mean(bri371,bri166,bri190,bri374,bri185,bri286
 ,bri321,bri275,bri144,bri358,bri77)
compute cars=mean(bri234,bri252)
compute men=mean(bri245,bri60,bri345,bri2)
compute alone=mean(bri284,bri271,bri124)
compute affluenc=mean(bri376,bri351,bri171)
compute misc_c=mean(bri375,bri326,bri49)
compute politics=mean(bri265,bri270,bri248,bri306,bri218,bri116,bri75)
compute books=mean(bri310,bri361,bri132,bri113,bri347,bri82)
compute travel=mean(bri204,bri182,bri302,bri242,bri263,bri281,bri212,bri80
  ,bri243,bri366,bri296,bri162,bri395,bri91,bri69)
compute partiesc=mean(bri283,bri209,bri11)
compute misc_d=mean(bri86,bri126,bri201,bri110,bri40)
compute culture=mean(bri227,bri333,bri46,bri232,bri334,bri7)
compute greens=mean(bri140,bri122,bri292)
compute summersp=mean(bri208,bri400,bri372,bri70,bri79,bri109,bri42
 ,bri356,bri206)
compute phys_ex=mean(bri44,bri352,bri354,bri231,bri6)
compute generos=mean(bri117,bri48,bri323,bri20)
compute pets=mean(bri196,bri189,bri184)
compute sensitiv=mean(bri136,bri106,bri76)
compute children=mean(bri327,bri353,bri262,bri125,bri157,bri74)
compute games=mean(bri330,bri205,bri53)
compute warmth_c=mean(bri329,bri210,bri179,bri249,bri187,bri213,bri64,bri62)
compute new_expe=mean(bri244,bri172,bri72)
compute fin_proj=mean(bri390,bri35)
compute laughter=mean(bri350,bri276,bri61)
compute alone_ac=mean(bri41,bri9)
compute nervous=mean(bri386,bri335,bri317,bri224
 ,bri188,bri141,bri131)
compute sex_scl=mean(bri228,bri340,bri267,bri139)
compute friendsh=mean(bri285,bri277,bri250,bri65)
compute irritati=mean(bri114,bri89,bri394,bri211,bri318,bri143)
compute jokes=mean(bri370,bri344,bri258,bri203)
compute anger=mean(bri84,bri73,bri198,bri95,bri176,bri123
 ,bri58,bri134,bri56)
compute overeat=mean(bri357,bri223,bri3)
compute misc_e=mean(bri279,bri99,bri183,bri87,bri300)
compute irrespon=mean(bri264,bri289,bri240,bri332,bri177,bri115,bri71)
compute computin=mean(bri396,bri273,bri384,bri168,bri28)
compute work=mean(bri158,bri316,bri215,bri66,bri24)
compute achievmt=mean(bri320,bri219,bri226,bri100,bri96,bri239,bri381
 ,bri180,bri25,bri246,bri170)
